#ifndef DATAMODEL_H
#define DATAMODEL_H

#include <QAbstractTableModel>
#include <QVector>

struct DataRow
{
    QString month;
    int days;

    DataRow() {}
    DataRow(QString month, int days): month(month), days(days) {}
};

class DataModel : public QAbstractTableModel
{
    Q_OBJECT

    QVector<DataRow> m_data;
public:
    explicit DataModel(QObject *parent = 0);

    int rowCount(const QModelIndex &parent) const;
    int columnCount(const QModelIndex &parent) const;
    QVariant data(const QModelIndex &index, int role) const;

public:
    void filterChanged(int season);

private:
    int season;
};

#endif // DATAMODEL_H
